package net.trade.trade.dao.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import net.trade.trade.dao.FundDAO;

@Repository
public class FundDAOImpl extends SqlMapClientDaoSupport implements FundDAO {

	@Override
	public List userFundList(HashMap<String, String> param) {
		List list = getSqlMapClientTemplate().queryForList(
				"fund.userFundList", param);
		return list;
	}

	@Override
	public List userFundCount(HashMap<String, String> param) {
		List list = getSqlMapClientTemplate().queryForList(
				"fund.userFundCount", param);
		return list;
	}

	@Override
	public List manageFundList(HashMap<String, String> param) {
		List list = getSqlMapClientTemplate().queryForList(
				"fund.manageFundList", param);
		return list;
	}

	@Override
	public List manageFundCount(HashMap<String, String> param) {
		List list = getSqlMapClientTemplate().queryForList(
				"fund.manageFundCount", param);
		return list;
	}

	@Override
	public String updAccount(HashMap<String, String> map) {
		int rows = getSqlMapClientTemplate().update("fund.updAccount", map);
        return rows+"";
	}

}
